home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
pascalt2.zip
/
PROCED3.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-15
|
593b
|
20 lines
(* Chapter 5 - Program 3 *)
program Make_A_Fruit_Salad;
var Apple,Orange,Pear,Fruit : integer;
procedure Add_The_Fruit(Value1,Value2 : integer; (* one-way *)
var Total : integer; (* two-way *)
Value3 : integer); (* one-way *)
begin
Total := Value1 + Value2 + Value3;
end;
begin (* main program *)
Apple := 4;
Orange := 5;
Pear := 7;
Add_The_Fruit(Apple,Orange,Fruit,Pear);
Writeln('The fruit basket contains ',Fruit:3,' fruits');
end. (* of main program *)